package com.fyzk.activity.lottery.shuzicai;

public class PublicMethodUtils {
	/**
	 * 倒计时
	 * 
	 * @param l
	 *            时间差值
	 * @return
	 */
	public static String daojishi(long l) {
		int m, d, h, min, s;
		d = (int) (l / 1000 / 60 / 60 / 24);
		h = (int) (l / 1000 / 60 / 60 % 24);
		min = (int) (l / 1000 / 60 % 60);
		s = (int) (l / 1000 % 60);

		String month, date, hour, minutes, seconds;
		seconds = "" + s;
		if (s < 10) {
			seconds = "0" + s;
		}
		minutes = "" + min;
		if (min < 10) {
			minutes = "0" + min;
		}
		hour = "" + h;
		if (h < 10) {
			hour = "0" + h;
		}

		return d + "天" + hour + "小时" + minutes + "分钟";
	}
}
